home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / dev / sun3.md / devConfig.c < prev    next >
C/C++ Source or Header  |  1990-12-07  |  4KB  |  113 lines

  1. /* 
  2.  * devConfig.c --
  3.  *
  4.  *    Configuration table for the devices in the system.  There is
  5.  *    a table for the possible controllers in the system, and
  6.  *    then a table for devices.  Devices are implicitly associated
  7.  *    with a controller.  This file should be automatically generated
  8.  *    by a config program, but it isn't.
  9.  *
  10.  * Copyright 1986, 1989 Regents of the University of California
  11.  * Permission to use, copy, modify, and distribute this
  12.  * software and its documentation for any purpose and without
  13.  * fee is hereby granted, provided that the above copyright
  14.  * notice appear in all copies.  The University of California
  15.  * makes no representations about the suitability of this
  16.  * software for any purpose.  It is provided "as is" without
  17.  * express or implied warranty.
  18.  */
  19.  
  20. #ifndef lint
  21. static char rcsid[] = "$Header: /sprite/src/kernel/dev/sun3.md/RCS/devConfig.c,v 9.5 90/12/06 21:58:20 jhh Exp $ SPRITE (Berkeley)";
  22. #endif not lint
  23.  
  24.  
  25. #include "sprite.h"
  26. #include "devInt.h"
  27. #include "scsiHBA.h"
  28. #include "devTypes.h"
  29.  
  30. /*
  31.  * Per device include files.
  32.  */
  33. #include "scsi3.h"
  34. #include "scsi0.h"
  35. #include "xylogics450.h"
  36. #include "jaguar.h"
  37. #include "devTMR.h"
  38.  
  39. /*
  40.  * The controller configuration table.
  41.  */
  42. DevConfigController devCntrlr[] = {
  43.    /* Name     Address,  Addr space, ID, InitProc   IntrVector  IntrRoutine. */
  44.     { "SCSI3", 0x0FE12000,    DEV_OBIO,  0, DevSCSI3Init,26, DevSCSI3Intr },
  45.     { "SCSI3",  0x200000, DEV_VME_D16A24, 0, DevSCSI3Init, 64, DevSCSI3Intr },
  46.     { "SCSI0",  0x200000, DEV_VME_D16A24, 0, DevSCSI0Init, 64, DevSCSI0Intr },
  47.     { "Xylogics450", 0xee40, DEV_VME_D16A16,     0, DevXylogics450Init,
  48.                     72, DevXylogics450Intr},
  49.     { "JaguarHBA", 0x8800, DEV_VME_D16A16, 0, DevJaguarInit, 211, 
  50.                         DevJaguarIntr},
  51.     { "tmr0", 0x0FE14000, DEV_OBIO, 0, Dev_TimerProbe, 0, ((Boolean (*)())0)},
  52.  
  53. };
  54. int devNumConfigCntrlrs = sizeof(devCntrlr) / sizeof(DevConfigController);
  55.  
  56. /*
  57.  * Table of SCSI HBA types attached to this system.
  58.  */
  59.  
  60. ScsiDevice *((*devScsiAttachProcs[]) _ARGS_((Fs_Device *devicePtr,
  61.         void (*insertProc) (List_Links *elementPtr,
  62.                                     List_Links *elementListHdrPtr)))) = {
  63.     DevSCSI3AttachDevice,        /* SCSI Controller type 0. */
  64.     DevSCSI0AttachDevice,        /* SCSI Controller type 1. */
  65.     DevJaguarAttachDevice,        /* SCSI Controller type 2. */
  66. };
  67. int devScsiNumHBATypes = sizeof(devScsiAttachProcs) / 
  68.              sizeof(devScsiAttachProcs[0]);
  69.  
  70. /*
  71.  * A list of disk devices that is used when probing for a root partition.
  72.  * The choices are:
  73.  * Drive 0 partition 0 of xylogics 450 controller 0.
  74.  * Drive 1 partition c of xylogics 450 controller 0.
  75.  * SCSI Disk target ID 0 LUN 0 partition 2 on SCSI0 HBA 0.
  76.  * SCSI Disk target ID 0 LUN 0 partition 2 on SCSI3 HBA 0. 
  77.  * SCSI Disk target ID 0 LUN 0 partition 0 on SCSI0 HBA 0.
  78.  * SCSI Disk target ID 0 LUN 0 partition 0 on SCSI3 HBA 0. 
  79.  */
  80. Fs_Device devFsDefaultDiskPartitions[] = { 
  81.     /*
  82.      * Mint boots from its 'a' partition.
  83.      */
  84.     { -1, DEV_XYLOGICS, 0, (ClientData) NIL },
  85.     /*
  86.      * Nadreck (at PARC) boots from disk LUN 1, partition c.
  87.      * (2 bits for LUN, then three bits for partition => 013)
  88.      */
  89.     { -1, DEV_XYLOGICS, 013, (ClientData) NIL },
  90.     { -1, SCSI_MAKE_DEVICE_TYPE(DEV_SCSI_DISK, DEV_SCSI0_HBA, 0, 0, 0, 2),
  91.       SCSI_MAKE_DEVICE_UNIT(DEV_SCSI_DISK, DEV_SCSI0_HBA, 0, 0, 0, 2),
  92.         (ClientData) NIL }, 
  93.     /*
  94.      * The first entry is repeated to get around the problems with 
  95.      * unit attentions.  Right now the kernel will get a unit attention on
  96.      * the first access and will bail out.  Gross. jhh 12/6/90
  97.      */
  98.     { -1, SCSI_MAKE_DEVICE_TYPE(DEV_SCSI_DISK, DEV_SCSI0_HBA, 0, 0, 0, 2),
  99.       SCSI_MAKE_DEVICE_UNIT(DEV_SCSI_DISK, DEV_SCSI0_HBA, 0, 0, 0, 2),
  100.         (ClientData) NIL }, 
  101.     { -1, SCSI_MAKE_DEVICE_TYPE(DEV_SCSI_DISK, DEV_SCSI3_HBA, 0, 0, 0, 2),
  102.       SCSI_MAKE_DEVICE_UNIT(DEV_SCSI_DISK, DEV_SCSI3_HBA, 0, 0, 0, 2),
  103.         (ClientData) NIL },
  104.     { -1, SCSI_MAKE_DEVICE_TYPE(DEV_SCSI_DISK, DEV_SCSI0_HBA, 0, 0, 0, 0),
  105.       SCSI_MAKE_DEVICE_UNIT(DEV_SCSI_DISK, DEV_SCSI0_HBA, 0, 0, 0, 0),
  106.         (ClientData) NIL }, 
  107.     { -1, SCSI_MAKE_DEVICE_TYPE(DEV_SCSI_DISK, DEV_SCSI3_HBA, 0, 0, 0, 0),
  108.       SCSI_MAKE_DEVICE_UNIT(DEV_SCSI_DISK, DEV_SCSI3_HBA, 0, 0, 0, 0),
  109.         (ClientData) NIL }, 
  110.     };
  111. int devNumDefaultDiskPartitions = sizeof(devFsDefaultDiskPartitions) / 
  112.               sizeof(Fs_Device);
  113.